package com.cqc.jdk8.Jutil.concurrent.threadPoolExecutor.base;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * @author cui
 * @date 2023/11/11 9:38
 * @description
 **/
public class TaskCallable23 implements Callable<Integer> {


    @Override
    public Integer call() {
        try {
            TimeUnit.SECONDS.sleep(3);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
        System.out.println("进入 TaskCallable23 的 run 方法，" + time);
        return 23;
    }

    @Override
    public String toString() {
        return "TaskCallable23{}";
    }
}